<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
<!--    <script src="js/checkLogin.js"></script>-->
    <script src="js/jquery-3.1.1.js"></script>
    <script src="js/base.js"></script>

</head>
<body>
<form enctype="multipart/form-data">

</form>
    <div id="nickname">请登录</div>
    <img id="icon" src="img/user_auto.png" style="width: 100px;height: 100px;"/>
        <script>

            $.rest("get","http://localhost:8080/user/token",null,function(result){
              if(result.code==500){
                  //window.location.href="http://localhost:9002/signIn.html";
              }else{

                  let user=result.result;
                  let nickname=user.nickname;
                  let iconLink=user.iconLink;
                  document.getElementById("nickname").innerHTML=nickname;
                  document.getElementById("icon").src=iconLink;
              }
          });




        </script>
</body>
</html>